import request from '@/utils/request'

// 查询商品盘存列表
export function listTaking(query) {
  return request({
    url: '/ybUpload/stocktaking/list',
    method: 'get',
    params: query
  })
}

// 查询商品盘存详细
export function getTaking(id) {
  return request({
    url: '/ybUpload/stocktaking/' + id,
    method: 'get'
  })
}

// 新增商品盘存
export function addTaking(data) {
  return request({
    url: '/ybUpload/stocktaking',
    method: 'post',
    data: data
  })
}

// 修改商品盘存
export function updateTaking(data) {
  return request({
    url: '/ybUpload/stocktaking',
    method: 'put',
    data: data
  })
}

// 删除商品盘存
export function delTaking(id) {
  return request({
    url: '/ybUpload/stocktaking/' + id,
    method: 'delete'
  })
}